﻿#ifndef RESPONSEDATA_H
#define RESPONSEDATA_H

#include "types.h"
#include "protocol/databuffer.h"
#include "utils/utils.h"

typedef struct {
    u8 version:4;
    u8 type   :4;
    u8 command;
}__attribute__ ((__packed__)) head_t;

#define PROT_VERSION_0    0

#define PROT_TYPE_REQUEST 1
#define PROT_TYPE_INDICAT 2
#define PROT_TYPE_ACK     2

#pragma  pack (push,1)
typedef struct {
    u8   b_started:1;
    u8   ctrl_mode:3;
    u8   res      :4;
    s16  velocity;
    s16  vbus_curr;
    s16  vbus_vol;
    s16  curr_dq[2];
    s16  vol_dq[2];
    u32  sys_time;
}mot_stat_t;
#pragma  pack (pop)

#endif // RESPONSEDATA_H
